package com.woniuxy.trade.controller;

import com.woniuxy.trade.config.SmsTemplate;
import com.woniuxy.trade.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OdersController {
    @Autowired
    OrdersService ordersService;

    /**
     * 发送短信给用户并进入订单支付倒计时
     * @param ordersId
     */
    @GetMapping("/orders/sendMessage")
    public void sendMessage(@RequestParam int ordersId){
        ordersService.sendMessage(ordersId);
    }
}
